#ifndef __SHAPERESOLVER__H
#define __SHAPERESOLVER__H

#include <map>
#include <string>

#include <Ogre.h>
#include <btBulletDynamicsCommon.h>
#include "BtOgre/BtOgreGP.h"

//!TODO: check for leak on destruction...
/**
 * \class ShapeResolver
 * \author gershon
 * \file ShapeResolver.h
 * \brief Resolves strings to shapes
 */
class ShapeResolver
{
public:

	enum Shape { CONVEX, BOX, SPHERE, CYLINDER, TRIMESH };
	typedef std::map<std::string, Shape> StringShapeMap;

	static Shape getShape(const std::string& s);
	static btCollisionShape* getShape(const std::string& s, Ogre::Entity* e);
	
private:
	static void init();
	
protected:
	static bool mInit;
	static StringShapeMap shapeMap;
};

#endif
